package org.gis.mapserver.plugins.rasterimage;

import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.objective.base.BaseObject;
import org.objective.base.BaseType;
import org.objective.base.Storage;
import org.objective.base.TypeModule;

/**
 *
 * @author gus
 */
public class RasterImageType extends BaseType
{
    private String typeName;

    public RasterImageType(Storage storage, long id, TypeModule ownerModule)
    {
        super(storage, id, ownerModule);
    }

    @Override
    public String getDescription()
    {
        return "raster image type";
    }

    @Override
    public String getName()
    {
        return "RasterImageType";
    }

    @Override
    public String getTypeName()
    {
        return typeName;
    }

    @Override
    public void setTypeName(String name)
    {
        typeName = name;
    }

    @Override
    public Class getObjectType()
    {
        return RasterImageObject.class;
    }

    @Override
    protected BaseObject constructNewObject(long oid)
    {
        try
        {
            return new RasterImageObject(storage, oid, this, null);
        }
        catch (Exception ex)
        {
            Logger.getLogger(RasterImageType.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }

    @Override
    protected final UUID getUnique()
    {
        return UUID.fromString("cb2a40a8-20f1-4b3e-95c0-1e50932b62d8");
    }
}
